<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
					  "http://www.w3.org/TR/xhtml1-transitional.dtd">
<html>
<head>
	<title>Sports Online Store</title>
	<%= stylesheet_link_tag "depot", :media => "all" %>
  	<%= javascript_include_tag :defaults %>
</head>
<body id="store">
	<div id="banner">
		<%= image_tag("sports.jpg")%>
		<div id= "img">
			<%= @page_title || "Sports Store" %>
			<% if session[:user_id] == nil %>
				<%= link_to "Login", :controller => 'admin', :action => 'login' %>
			<% end %>
			<% if session[:user_id] %>
				 <%= link_to 'Logout', :controller => 'admin', :action => 'logout' %>
			<% end %>
				
		</div>
		<a href="http://localhost:3000/store">Home</a><br \>
		<%= link_to "Questions", :controller => 'store', :action => 'ask' %><br>
		<a href="http://www..../news">News</a><br \>
		<a href="http://www..../contact">Contact</a><br \>	
	</div>
	<div id="columns">
		<div id="side">
			<% if @cart %>
				<% hidden_div_if(@cart.items.empty?, :id => "cart") do %>
		        	<%= render(:partial => "cart", :object => @cart) %>
		    	<% end %>
			<% end %>
			<!--><a href="http://www....">Home</a><br />
			<a href="http://www..../faq">Questions</a><br />
			<a href="http://www..../news">News</a><br />
			<a href="http://www..../contact">Contact</a><br />-->
			<%= Time.now %><br />
			<div id="link">
				<%= link_to "Add Product to Store", products_path %><br \>
			<% if User.count == 0 %>
				<%= link_to 'New User', :controller => 'users', :action => 'new'%>
			<% end %>
			</div>
			
			<% if session[:user_id] %>
				<br \>
				<%= link_to 'Orders',   	  	:controller => 'orders'%><br \>
				<%= link_to 'Products', 	  	:controller => 'products'%><br \>
				<%= link_to 'Users',    	  	:controller => 'users'%><br \>
				<%= link_to 'User Questions',	:controller => 'questions'%>
			<% end %>
		</div>
		<div id="main">
			<% if flash[:notice] -%>
				<div id="notice"><%= flash[:notice] %></div>
			<% end -%>
			
			<%= yield :layout %>
		</div>
	</div>
</body>
</html>